-- GENERATED SPELL FOR [Theradrim Guardian] --


function spell0_11784(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(16790,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11784', 2000, 1)
end

function spell1_11784(pUnit, Event) --@Summon Theradrim Shardling,Self--
pUnit:FullCastSpellOnTarget(21057,pUnit)
pUnit:RegisterEvent('Sorts_11784', 605, 1)
end

function Sorts_11784(pUnit, Event)
local choix_sorts_11784 = math.random(0, 1)
if choix_sorts_11784 == 0 then
pUnit:RegisterEvent('spell0_11784', 1, 1)
end
if choix_sorts_11784 == 1 then
pUnit:RegisterEvent('spell1_11784', 1, 1)
end
end

function mob11784_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11784', math.random(1500, 3000), 1)
end

function mob11784_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11784_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11784_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11784, 1, 'mob11784_Action')
RegisterUnitEvent(11784, 2, 'mob11784_Leave')
RegisterUnitEvent(11784, 3, 'mob11784_Kill')
RegisterUnitEvent(11784, 4, 'mob11784_Die')
